0,18

N = 1 (slider from 1 to 20, step 1)
S = Sum((1 / ((2 * n) - 1) * sin((((2 * n) - 1) * x))), n, 1, N)
p(x) = If[(1 / N * asin(π / 4)) < x < π - (1 / N * asin(π / 4)), (2 * ((4 / π * S(x)) - 1))]
f(x) = If[0 < x < π, 0.36]